<template>
  <div>
    <ul class="mui-table-view mui-table-view-chevron">
      <li v-for="item in newslist" v-bind:key="item.time" class="mui-table-view-cell mui-media">

        <router-link :to="'/home/newsinfo/'+item.id" class="mui-navigate-right">
          <img class="mui-media-object mui-pull-left" src="../../img/shuijiao.jpg">
          <div class="mui-media-body">
            <h1>牛逼</h1>
            <p class="mui-ellipsis">
              <span>发布时间：{{ item.time }}</span>
              <span>点赞：{{ item.good }}</span>
            </p>
          </div>
        </router-link>
      </li>
    </ul>
  </div>
</template>

<script>
import { Toast } from "mint-ui";

export default {
  data() {
    return {
      newslist: [
        {id:'1',time: "2017-01-01", good: "5" },
        {id:'2', time: "2017-02-02", good: "5" },
        {id:'3', time: "2017-03-03", good: "5" },
        {id:'4', time: "2017-04-04", good: "5" },
        {id:'5', time: "2017-05-05", good: "5" },
        {id:'6', time: "2017-06-06", good: "5" },
        {id:'7', time: "2017-07-07", good: "5" },
        {id:'8', time: "2017-08-08", good: "5" },
        {id:'9', time: "2017-09-011", good: "5"},
        {id:'10', time: "2017-10-12", good: "5" },
        { id:'11',time: "2017-11-02", good: "5" },
        {id:'12', time: "2017-11-07", good: "5" },
        {id:'13', time: "2017-12-02", good: "5" },
        {id:'14', time: "2017-08-03", good: "5" }
      ]
    };
  },
  methods: {
    gtelist() {
      // this.$http.get("../../news.json").then(result=>{
      //        console.log(result);
      // },error=>{
      //    Toast('提示信息');
      // })
    }
  },
  created() {
    this.gtelist();
  }
};
</script>

<style scoped>
.mui-media-body h1 {
  font-size: 16px;
}
.mui-ellipsis {
  font-size: 12px;
  color: #226aff;
  display: flex;
  justify-content: space-between;
}
</style>
